www-Sharp script console lets you execute scripts and immediately see its output. It is very usefull for debugging purposes and just to see what specific function does.
www-Sharp script console supports ActiveX script engines such as JScript, VBScript, PerlScript, Python (only JScript and VBScript are installed with Internet Explorer, other engines should be installed separately), JScript.Net (requires .Net Framework 1.1), batch files, PHP scripts (through php_cli.exe) and .Net programs (one-unit program that compiles on the fly and sends its output into output window). You can execute script by pressing button on toolbar or by pressing CTRL+ENTER.
Script engines used by www-Sharp s cript console could be separated on two groups :
"Host" object is used to collect output from script.
Method | Description |
---|---|
Write(ouput: string) | Sends output into output window |
WriteLn(output: string) | Sends output into output window and appends end-of-line marker |
MsgBox(value: string; caption: string; buttons: int): int | Shows message box with specified text, caption and buttons. Function is analog of MsgBox funtion in VBScript. |
ExporeObject(obj: Object) | Shows "COM Object Explorer" dialog and lets you examine/change object properties. |
DoEvents() | Processes messages queue. |
Sleep(Milliseconds: Integer) | Sleeps specified number of milliseconds. |
"WScript" object is added for compatibility with Windows Script Host. This object simulates WScript object from WSH but it is not the same object. For example, connecting events is not supported
Property/Method | Description |
---|---|
Arguments | Always returns null. |
Build version | Returns 0. |
FullName | Returns path to wwwSharp.exe. |
Interactive | Returns True. |
Name | Returns "www-Sharp". |
Path | Returns path to wwwSharp.exe. |
ScriptFullName | Returns empty string. |
StdErr | Returns null. |
StdIn | Returns null. |
StdOut | Returns null. |
Version | Returns 1. |
ConnectObject(obj: Object; strPrefix: string) | Not supported. |
CreateObject(strProgID: string; strPrefix: string) | Creates object with specified ProgID. If strPrefix is specified and is not empty string - error is raied saying that connect object is not implemented. |
DisconnectObject(obj: Object) | Not supported. |
Echo(str1: string; str2: string ...) | Outputs up to 16 strings (in one Echo call) into output window. |
GetObject(strPathName: string) | Returns object from specified path. |
Quit(intErrorCode: int) | Returns from the script. Does nothing in JScript.Net. |
Sleep(intTime: int) | Stops executing script for specified number of milliseconds. |
"Application" object represents www-Sharp application. Look www-Sharp objects for details.
Custom objects - you can add custom objects that will be available from script. Custom object is script file written in any supported script language (JScript, VBScript and any other installed ActiveX script). You can refer this script as object with name you assigned to it in "Select script objects" dialog that can be invoked from toolbar. This script file should have no global code because it can be loaded/unloaded on any time.
For script you can select type libraries ("Select type liraries" button on toolbar). You can then access constants that are defined in this type libraries. Class names defined in type libraries are not available.
With "Edit .Net references" you can select .Net assemblies that will be referenced by JScript.Net script or .Net program.